<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class User extends CI_Controller {

	public function register()
	{
		$this -> load -> model('user_model');
			
			$fname = $this -> input -> post('firstname');
			$lname = $this -> input -> post('lastname');
			$password = $this -> input -> post('password');
			$email = $this -> input -> post('email');
			
			$location = $this -> input -> post('location');
			$company = $this -> input -> post('organisation');
			
			$dob = $this -> input -> post('year') . "-" . $this -> input -> post('month') . "-" . $this -> input -> post('day');

			
			
			$this -> user_model -> register_user($password, $fname, $lname, $email, $location, $company, $dob);
		
	}
	
	
}

